<template>
	<view class="my-search-container" :style="{'background-color': bgColor}">
		<view class="my-search-box" :style="{'border-redius': redius + 'px'}"
				@click="searchHandler">
			<uni-icons type="search" size="20"></uni-icons>
			<text class="placeholder">{{placeholder}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		props:{
			bgColor:{
				type:String,
				default:'#c00000'
			},
			redius:{
				type:Number,
				default:18
			},
			placeholder:{
				type:String,
				default:'搜索'
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			searchHandler(){
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
.my-search-container{
	background-color: #c00000;
	height: 50px;
	display: flex;
	align-items: center;
	.my-search-box{
		background-color: #ffffff;
		height: 36px;
		border-radius: 15px;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		.placeholder{
			font-size: 15px;
			margin-left: 5px;
		}
	}
}

</style>